<template>
    <div class="SearchTop">
        <form action="/">
            <van-search
                v-model="value"
                show-action
                shape="round"
                placeholder="请输入搜索关键词"
                @search="onSearch"
                @cancel="onCancel"
            />
        </form>
    </div>
</template>

<script>
import { Toast } from 'vant';
export default {
    data() {
        return {
            value: '',
        };
    },
    methods: {
        onSearch(val) {
            Toast(val);
        },
        onCancel() {
            // Toast('取消');
            this.$router.push('/')
        },
    },
}
</script>

<style scoped>

</style>
